package edu.ynu.se.xiecheng.achitectureclass.common.service;

import edu.ynu.se.xiecheng.achitectureclass.common.dao.CommonRecodeDAO;
import edu.ynu.se.xiecheng.achitectureclass.common.entity.CommonRecode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HistoryService {

    @Autowired
    private CommonRecodeDAO commonRecodeDAO;

    public List<CommonRecode> getHistoryData(String seriesId) {
        return commonRecodeDAO.findByDeviceSeriesIdOrderByCreateTimeDesc(seriesId);
    }
}
